package com.by.remote.api;

import com.by.remote.dto.StockDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/4/2 19:09
 * @注释
 */
@FeignClient(value = "pyb-stock")
public interface StockRemoteClient {
    /**
     * 查询库存
     * @param id
     * @return
     */
    @GetMapping("/stock")
    public Map query(@RequestParam("id")int id);

    /**
     * 根据条件查询库存接口
     * @param stockDto
     * @return
     */
    @PostMapping("/stockByLike")
    public Map selectByLike(@RequestBody StockDto stockDto);
}
